from django.urls import path, re_path
from rest_framework.routers import DefaultRouter
# from rest_framework_jwt.views import obtain_jwt_token
from demo_app import views

router = DefaultRouter()
router.register('goods', views.GoodsModelViewSet)
router.register('order', views.OrderModelViewSet)
router.register('comment', views.CommentModelViewSet)
urlpatterns = [
    # path('login/', obtain_jwt_token),  # 用户名和密码换token的视图
    path('login/', views.LoginView.as_view())
]
urlpatterns += router.urls
